<template>
    <div>
        <!-- 标题 -->
        <van-nav-bar title="详情" left-arrow @click-left="onClickLeft" />
        <div>
            <div v-for="item in detailinfo">
                <img :src="item.goods_small_logo" alt="">
                <p>{{ item.goods_introduce}}</p>
                <p>{{ item.goods_price }}</p>
            </div>
        </div>
        <!-- 动作栏 -->
        <div>
            <van-action-bar>
                <van-action-bar-icon icon="chat-o" text="客服" dot />
                <van-action-bar-icon icon="cart-o" text="购物车" badge="5" />
                <van-action-bar-icon icon="shop-o" text="店铺" badge="12" />
                <van-action-bar-button type="warning" text="加入购物车" />
                <van-action-bar-button type="danger" text="立即购买" />
            </van-action-bar>

        </div>
    </div>
</template>

<script setup>
import { ref } from 'vue'
import axios from '../request'
const detailinfo = ref([])
const detailinfoinit = () => {
    axios.get('https://api-hmugo-web.itheima.net/api/public/v1/goods/detail', {
        params: {
            goods_id: route.query.id
        }
    })
}
detailinfoinit
</script>

<style lang="scss" scoped></style>